#pragma once
#include <iostream>
class TimeCounter
{
public:
friend std::ostream& operator<<(std::ostream& out, TimeCounter& cntr);
   TimeCounter() {started=false; stopped=false;}
   void Start();
   void Start(int nPriority);
   void Stop();
   double timeElapsed() const;
   bool getStarted() const {return started;}
   bool getStopped() const {return stopped;} 
   int getNewPriority() const {return new_priority;} 
   ~TimeCounter();

protected:

   int new_priority;
   int old_priority;
   bool started;
   bool stopped;
   double tBefore, tAfter, i64PerfFrequency;
    double tWord;

};

